Skip to content

Add upfront dependency check for RLCR loop (codex, jq, git)#32

Merged
SihaoLiu merged 2 commits intomainfrom
claude/add-dependency-check-tA0P8
Mar 4, 2026
Merged

Add upfront dependency check for RLCR loop (codex, jq, git)#32
SihaoLiu merged 2 commits intomainfrom
claude/add-dependency-check-tA0P8

Conversation

@SihaoLiu
Copy link
Copy Markdown
Contributor

@SihaoLiu SihaoLiu commented Mar 4, 2026

No description provided.

Check all required external tools (codex, jq, git) at the start of
setup-rlcr-loop.sh before any loop initialization. Previously, jq was
not checked at all and would cause cryptic failures mid-loop when the
stop hook tried to produce JSON output. Now users get a single clear
error listing all missing tools with install links.

Replaces the standalone codex check that ran later in the setup flow.

https://claude.ai/code/session_01RHtyGrUsBvUC6S924XhcM7
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19840771b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1193 to +1197
# Create mock codex and jq
mkdir -p "$TEST_DIR/repo49/bin"
echo '#!/bin/bash
exit 0' > "$TEST_DIR/repo49/bin/codex"
chmod +x "$TEST_DIR/repo49/bin/codex"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mock jq in all-dependencies-present test

This test is intended to verify the success path when all dependencies are available, but it only creates a mock codex binary and never provides jq. On environments where jq is not already on PATH, setup-rlcr-loop.sh now exits with the new dependency error, so this case fails for an infrastructure reason rather than a product regression; that makes the robustness suite host-dependent and flaky.

Useful? React with 👍 / 👎.

The test only mocked codex but not jq, causing it to fail on
environments where jq is not on PATH.

https://claude.ai/code/session_01RHtyGrUsBvUC6S924XhcM7
@SihaoLiu
Copy link
Copy Markdown
Contributor Author

SihaoLiu commented Mar 4, 2026

@codex review again

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df26142e5f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


MISSING_DEPS=()

if ! command -v codex &>/dev/null; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Defer dependency gate until after input validation

Checking codex at startup now short-circuits the script before plan/repo validation, so in environments where Codex is not installed users always see the dependency error even for malformed invocations (for example: missing plan file, conflicting plan-file args, or non-git repo). This makes diagnostics environment-dependent and regresses existing robustness checks that expect deterministic validation errors for those inputs.

Useful? React with 👍 / 👎.

@SihaoLiu SihaoLiu merged commit 93d7f44 into main Mar 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants